package org.framework.lazy.cloud.network.heartbeat.client.netty.permeate.tcp.advanced;


import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyChannelContext;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyProxyMsg;
import org.framework.lazy.cloud.network.heartbeat.common.advanced.permeate.tcp.AbstractTcpHandleChannelHeartbeatTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.constant.TcpMessageType;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Role;


/**
 * 服务端 处理客户端心跳
 * TCP_TYPE_HEARTBEAT
 */
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public class ClientHandleTcpChannelHeartbeatTypeAdvanced extends AbstractTcpHandleChannelHeartbeatTypeAdvanced<NettyProxyMsg> {

    /**
     * 处理当前数据
     *
     * @param nettyChannelContext 当前通道
     * @param msg     通道数据
     */
    @Override
    public void doHandler(NettyChannelContext nettyChannelContext, NettyProxyMsg msg) {
        NettyProxyMsg hb = new NettyProxyMsg();
        hb.setType(TcpMessageType.TCP_TYPE_HEARTBEAT);
//        nettyChannelContext.writeAndFlush(hb);
    }

}
